/*

* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Smart-Shop开源商城系统/ Java商城-首选电商平台系统 请务必保留此注释头信息
* |     开源地址: https://gitee.com/ningbo-qishan/gruul-mall
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     可正常分享和学习源码,未经授权 不可商用！
* |     商业版中台购买/开源版商业授权 联系技术客服
* |     官网:  https://www.73app.cn/
* ------------------------------------------------------------------------
* ------------------------------------------------------------------------
* |     Copyright (c) 2016-2999 宁波启山智软科技有限公司
* |     版权所有 ,侵权必究！
* ------------------------------------------------------------------------

*/
package com.medusa.gruul.finance.api.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.medusa.gruul.common.data.base.BaseEntity;
import com.medusa.gruul.finance.api.enums.ShowModeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Max;
import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;

/**
 * <p>
 * 财务设置
 * </p>
 *
 * @author alan
 * @since 2020 -02-26
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("t_finance_setting")
@ApiModel(value = "FinanceSetting对象", description = "财务设置")
public class FinanceSetting extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * id
     */
    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 商铺ID
     */
    @ApiModelProperty(value = "商铺ID")
    @TableField("shop_id")
    private String shopId;

    /**
     * 最小提现金额
     */
    @NotNull(message = "最小提现金额不能为空")
    @ApiModelProperty(value = "最小提现金额")
    @TableField("min_withdrawal_amount")
    private BigDecimal minWithdrawalAmount;

    /**
     * 最大提现次数（每日）
     */
    @NotNull(message = "最大提现次数不能为空")
    @Min(value = 1,message = "最大提现次数不能小于1")
    @ApiModelProperty(value = "最大提现次数（每日）")
    @TableField("max_withdrawal_number")
    private Integer maxWithdrawalNumber;

    /**
     * 结算时间（每月）
     */
    @NotNull(message = "结算时间不能为空")
    @Max(value = 31,message = "结算时间不能大于31")
    @Min(value = 1,message = "结算时间不能小于1")
    @ApiModelProperty(value = "结算时间（每月）")
    @TableField("settlement_day")
    private Integer settlementDay;


    /**
     * 上次结算的截止日期
     */
    @ApiModelProperty(value = "上次结算的截止日期")
    @TableField("last_deadline")
    private String lastDeadline;

    /**
     * 区域团长佣金结算时间（每月）
     */
    @NotNull(message = "区域团长佣金结算时间不能为空")
    @Max(value = 31,message = "区域团长佣金结算时间不能大于31")
    @Min(value = 1,message = "区域团长佣金结算时间不能小于1")
    @ApiModelProperty(value = "区域团长佣金结算时间（每月）")
    @TableField("area_ass_brokerage_settlement_day")
    private Integer areaAssBrokerageSettlementDay;


    /**
     * 区域团长佣金上次结算的截止日期
     */
    @ApiModelProperty(value = "区域团长佣金上次结算的截止日期")
    @TableField("last_area_ass_brokerage_settlement_deadline")
    private String lastAreaAssBrokerageSettlementDeadline;

    /**
     * 提现方式
     */
    @NotBlank(message = "提现方式不能为空")
    @ApiModelProperty(value = "提现方式")
    @TableField("withdrawal_model")
    private String withdrawalModel;

    /**
     * 是否开启团长佣金激励计划
     */
    @NotNull(message = "是否开启团长佣金激励计划不能为空")
    @ApiModelProperty(value = "是否开启团长佣金激励计划")
    @TableField("open_ass_incentive")
    private Boolean openAssIncentive;

    /**
     * 是否开启区域团长佣金激励计划
     */
    @NotNull(message = "是否开启区域团长佣金激励计划不能为空")
    @ApiModelProperty(value = "是否开启区域团长佣金激励计划")
    @TableField("open_area_ass_incentive")
    private Boolean openAreaAssIncentive;

    /**
     * 显示佣金方式
     */
    @NotNull(message = "显示佣金方式不能为空")
    @ApiModelProperty(value = "显示佣金方式")
    @TableField("show_mode")
    private ShowModeEnum showMode;


}
